import Vue from 'vue'
import Router from 'vue-router'
import home from './components/home.vue'
import vip from './components/vip.vue'
import shopcar from './components/shopcar.vue'
import search from './components/search.vue'


Vue.use(Router)


export default new Router({
  mode: 'history',
  base: process.env.BASE_URL,
  routes: [
    // 重定向：设置打开默认显示画面
    {
      path:'/',
      redirect:'/home'
    },
    {
      path:'/home',
      component:home
    },
    {
      path:'/vip',
      component:vip
    },
    {
      path:'/shopcar',
      component:shopcar
    },
    {
      path:'/search',
      component:search
    },
  ],
  // 设置点击时高亮显示
  linkActiveClass:'mui-active'
})

